#ifndef BITMAP_H
#define BITMAP_H

typedef unsigned char  BYTE1;
typedef unsigned short BYTE2;
typedef unsigned int   BYTE4;

#pragma pack(push)
#pragma pack(1)
typedef struct BitmapFileHeader {
    BYTE2 bfType;
    BYTE4 bfSize;
    BYTE2 bfReserved1;
    BYTE2 bfReserved2;
    BYTE4 bfOffBits;
} BitmapFileHeader;

//#pragma pack(1)
typedef struct BitmapInfoHeader {
    BYTE4 biSize;
    BYTE4 biWidth;
    BYTE4 biHeight;
    BYTE2 biPlanes;
    BYTE2 biBitsPerPixel;
    BYTE4 biCompression;
    BYTE4 biImageSize;
    BYTE4 biXPixelsPerMeter;
    BYTE4 biYPixelsPerMeter;
    BYTE4 biClrUsed;
    BYTE4 biClrImportant;
} BitmapInfoHeader;


//#pragma pack(1)
typedef struct BitmapHeader {
    BitmapFileHeader file_header;
    BitmapInfoHeader info_header;
} BitmapHeader;

//#pragma pack(1)
typedef struct Rgb {
    unsigned char blue;
    unsigned char green;
    unsigned char red;
} Rgb;
#pragma pack(pop)

void print_file_header(BitmapFileHeader* header);
void print_info_header(BitmapInfoHeader* header);

#endif // BITMAP_H
